package com.sc.nft.service;


import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.sc.nft.entity.EquityProps;
import com.sc.nft.entity.vo.AirdropGrantEquityPropsRecordVO;
import com.sc.nft.entity.vo.AirdropGrantRecordExportListVO;
import com.sc.nft.entity.vo.AirdropGrantRecordVO;
import com.sc.nft.entity.vo.AirdropUserListVO;
import com.sc.nft.enums.EquityPropsTypeEnum;
import com.sc.nft.exception.GlobalException;
import org.springframework.web.multipart.MultipartFile;

import java.io.IOException;
import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * 服务接口
 *
 * @author rdg
 * @since 2022-06-09 17:05:25
 * @description 由 Mybatisplus Code Generator 创建
 */
public interface AirdropGrantRecordService {

    Page<AirdropGrantRecordVO> airdropGrantRecordList(int pageNo, int pageSize, String nickName, String userTel, String userUuid, String productUuid, String firstTitle, Integer typeClassify);

    /**
     * 批量空投导出
     * @param collectionName
     * @param startTime
     * @param endTime
     * @return
     */
    List<AirdropGrantRecordExportListVO> airdropGrantRecordListExport(String collectionName, Date startTime, Date endTime);

    void airdropGrant(String userIds, Long productId, Integer grantNum) throws GlobalException;
    //批量发放空投
    void batchAirdropGrant(List<Map> list, Long productId,Integer grantNum) throws IOException, GlobalException;

    AirdropUserListVO upLoadAirdropUserExcel(MultipartFile uploadFile) throws IOException;

    /**
     * 空投权益道具
     * @param userIds
     * @param equityProps
     * @param grantNum
     */
    void distributeEquityProps(Long userId, EquityProps equityProps, Integer grantNum);

    /**
     * 空投权益道具记录
     * @param pageNo
     * @param pageSize
     * @param nickName
     * @param userTel
     * @param firstTitle
     * @param typeClassify
     * @return
     */
    Page<AirdropGrantEquityPropsRecordVO> airdropGrantEquityPropsRecordList(Integer pageNo, Integer pageSize, String nickName, String userTel,String firstTitle, Integer typeClassify);

    void batchAirdropGrantEquityProps(List<Map> list, Long productId);
}
